package com.ruoyi.project.countrybus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.countrybus.mapper.SysCustomerMapper;
import com.ruoyi.project.countrybus.domain.SysCustomer;
import com.ruoyi.project.countrybus.service.ISysCustomerService;

/**
 * 乘客信息Service业务层处理
 * 
 * @author yangwenbo
 * @date 2022-04-05
 */
@Service
public class SysCustomerServiceImpl implements ISysCustomerService 
{
    @Autowired
    private SysCustomerMapper sysCustomerMapper;
//    private SysCustomerMapper sysCustomerMapper;

    /**
     * 查询乘客信息
     * 
     * @param customerId 乘客信息主键
     * @return 乘客信息
     */
    @Override
    public SysCustomer selectSysCustomerByCustomerId(Long customerId)
    {
        return sysCustomerMapper.selectSysCustomerByCustomerId(customerId);
    }


    /**
     * 查询乘客信息通过账号
     *
     * @param customerName 乘客账号
     * @return 乘客信息
     */
    @Override
    public SysCustomer selectSysCustomerByCustomerName(String customerName) {
        return sysCustomerMapper.selectSysCustomerByCustomerName(customerName);
    }


    /**
     * 查询乘客信息通过手机号
     *
     * @param phonenumber 乘客手机号
     * @return 乘客信息
     */
    @Override
    public SysCustomer selectSysCustomerByCustomerPhonenumber(String phonenumber) {
        return sysCustomerMapper.selectSysCustomerByCustomerPhonenumber(phonenumber);
    }

    /**
     * 查询乘客信息列表
     * 
     * @param sysCustomer 乘客信息
     * @return 乘客信息
     */
    @Override
    public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer)
    {
        return sysCustomerMapper.selectSysCustomerList(sysCustomer);
    }

    /**
     * 新增乘客信息
     * 
     * @param sysCustomer 乘客信息
     * @return 结果
     */
    @Override
    public int insertSysCustomer(SysCustomer sysCustomer)
    {
        return sysCustomerMapper.insertSysCustomer(sysCustomer);
    }

    /**
     * 修改乘客信息
     * 
     * @param sysCustomer 乘客信息
     * @return 结果
     */
    @Override
    public int updateSysCustomer(SysCustomer sysCustomer)
    {
        return sysCustomerMapper.updateSysCustomer(sysCustomer);
    }

    /**
     * 批量删除乘客信息
     * 
     * @param customerIds 需要删除的乘客信息主键
     * @return 结果
     */
    @Override
    public int deleteSysCustomerByCustomerIds(Long[] customerIds)
    {
        return sysCustomerMapper.deleteSysCustomerByCustomerIds(customerIds);
    }

    /**
     * 删除乘客信息信息
     * 
     * @param customerId 乘客信息主键
     * @return 结果
     */
    @Override
    public int deleteSysCustomerByCustomerId(Long customerId)
    {
        return sysCustomerMapper.deleteSysCustomerByCustomerId(customerId);
    }
}
